package com.str.intro;
public class EvenOddCount {

  public static void main(String[] args) {
    Counter even = new Counter();
    Counter odd = new Counter();

    for (int i = 0; i < 10; i++) {
      int k = (int) (Math.random() * 10);
      System.out.print(k + "  ");
      if (k % 2 == 0) even.inc();
      else odd.inc();
    }
    System.out.println();
    System.out.println("number of evens: " + even.getValue());
    System.out.println("number of odds:  " + odd.getValue());
  }
}
